﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting.Channels.Http;
using System.Runtime.Remoting.Channels;
using frag_boardgame;
using System.Runtime.Remoting.Channels.Tcp;

namespace RemoteClient
{
    class Program
    {

        private static RemoteGame.RemoteGame game;

        static void Main(string[] args)
        {

            TcpChannel chan = new TcpChannel();
            ChannelServices.RegisterChannel(chan, false);

            game = (RemoteGame.RemoteGame)Activator.GetObject(Type.GetType("RemoteGame.RemoteGame, RemoteGame"), "tcp://localhost:8080/Game");

            string join = Console.ReadLine();
            if (join.StartsWith("join"))
            {
                ConsoleUI.toShow = ToShow.Game;
            }

            ConsoleUI.Run(game);


            

        }
    }
}
